Conical = cc.Sprite.extend({
	origPos:null,
	ctor:function(p){
		this._super();
		p.addChild(this, 10, TAG_CONICAL);
		this.init();
	},
	init:function(){
		this.setCascadeOpacityEnabled(true);
		this.body = new cc.Sprite("#conical.png");
		this.addChild(this.body);
		
		var cap = new Button(this, 1, TAG_CONICAL2, "#conical2.png", this.callback, this);
		cap.setPosition(0, 42);
		this.origPos = cap.getPosition();
	},
	rotateBody1:function(){
		this.body.runAction(cc.rotateTo(0.3, 20));
	},
	rotateBody2:function(){
		this.body.runAction(cc.rotateTo(0.3, 0));
	},
	callback:function(p){
		cc.log("ppp===="+p.getTag());
		switch (p.getTag()) {
		case TAG_CONICAL2:
			this.callNext = cc.callFunc(function(){
				gg.flow.next();
			}, this);
			
			var seq = null;
			if(gg.flow.flow.action == ACTION_DO1){
				var bez = cc.bezierTo(1, [cc.p(20,this.body.height * 0.5),cc.p(60, this.body.height * 0.5),cc.p(50, -40)]);
				var rotate = cc.rotateTo(0.5, 90);
				seq = cc.sequence(bez, rotate, this.callNext);
			} else {
				var bez = cc.bezierTo(1, [cc.p(60, this.body.height * 1),cc.p(20,this.body.height * 1),this.origPos]);
				var rotate = cc.rotateTo(0.5, 0);
				seq = cc.sequence(rotate, bez, this.callNext);
			}
			p.runAction(seq);
			break;
		default:
			break;
		}
	}
});